package com.interview.rtc.aigc.dto;

import java.util.Date;

/**
 * 聊天消息数据传输对象
 */
public class ChatMessageDto {
    /**
     * 消息内容
     */
    private String value;
    
    /**
     * 消息时间
     */
    private String time;
    
    /**
     * 消息发送者（用户ID或机器人ID）
     */
    private String user;
    
    /**
     * 消息是否为段落结束
     */
    private Boolean paragraph;
    
    /**
     * 消息是否为确定性回答
     */
    private Boolean definite;
    
    /**
     * 消息是否被打断
     */
    private Boolean isInterrupted;

    // 构造函数
    public ChatMessageDto() {
    }

    public ChatMessageDto(String value, Date createTime, String user, Boolean isInterrupted) {
        this.value = value;
        this.time = createTime != null ? createTime.toString() : new Date().toString();
        this.user = user;
        this.isInterrupted = isInterrupted;
        this.paragraph = true; // 默认为段落结束
        this.definite = true;  // 默认为确定性回答
    }

    // getter和setter
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public Boolean getParagraph() {
        return paragraph;
    }

    public void setParagraph(Boolean paragraph) {
        this.paragraph = paragraph;
    }

    public Boolean getDefinite() {
        return definite;
    }

    public void setDefinite(Boolean definite) {
        this.definite = definite;
    }

    public Boolean getIsInterrupted() {
        return isInterrupted;
    }

    public void setIsInterrupted(Boolean isInterrupted) {
        this.isInterrupted = isInterrupted;
    }
} 